package com.chorye.datasource.controller;

import com.chorye.datasource.entity.Student;
import com.chorye.datasource.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Company: 北京XXXX有限公司
 * @Author JiangYy
 * @Title: StudentController
 * @Description: TODO
 * @Date 2018/12/13 14:32
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/get")
    public Student student() {
        return studentService.getById(1);
    }
}
